package com.star.controller;

import com.star.service.PictureService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

/**
 * 照片墙页面显示控制器
 *
 * @author tanyapeng
 * @date 2021/2/5
 */
@Controller
public class PictureShowController {

    @Resource
    private PictureService pictureService;

    @GetMapping("/picture")
    public String friends(Model model) {
        model.addAttribute("pictures", pictureService.listPicture());
        return "picture";
    }

}